#ifndef BOUNDING_BOX_H
#define BOUNDING_BOX_H

#include "Renderer.h"

const DWORD GREEN = 0xff00ff00;

class ENGINE_API BoundingBox
{
public:
   BoundingBox(const Vector3 max, const Vector3 min , DWORD color = GREEN);
   ~BoundingBox();
   
   virtual void draw(Renderer* renderer);

   Vector3 getMax() { return m_max; }
   Vector3 getMin() { return m_min; }
   
   void setVisible(bool visible) { m_visible = visible; }
   bool isVisible() { return m_visible; }
      
   Vector3* calculateBowndingVertices();

   void updateBox(const Vector3 max, const Vector3 min, DWORD color = GREEN);

private:
   ColorVertex* m_pVertices;
   unsigned int* m_pIndices;

   Vector3 m_max;
   Vector3 m_min;

   bool m_visible;

   Vector3* m_pBowndingVertices;
};

#endif//BOUNDING_BOX_H